<!--制度归档-->
<div class="OutDiv" [hidden]="pageIndex != 1">
  <div class="mainPage">
    <div class="leftTree">
      <div style="padding:15px;">
        <ul id="treeText" class="ztree"></ul>
      </div>
    </div>
    <div class="rightDiv">
      <div class="exciseTableDiv" style="height: auto !important;">
        <div>
          <label nz-radio-button style="border-right: 0;cursor: default" class="nocourse"><span>按制度状态</span></label>
          <nz-radio-group [(ngModel)]="tabType" [nzButtonStyle]="'solid'" (ngModelChange)="tabsChange($event)">
            <label nz-radio-button [nzValue]="'all'" style="border-radius: 0"><span>全部</span></label>
            <label nz-radio-button [nzValue]="0"><span>新增</span></label>
            <label nz-radio-button [nzValue]="5"><span>修订</span></label>
            <label nz-radio-button [nzValue]="10"><span>停用</span></label>
          </nz-radio-group>
        </div>
        <div style="margin: 15px 0;overflow: hidden">
          <div class="searchDiv fl-r">
            <label>
              <span>文件号：</span>
              <input nz-input [(ngModel)]="number" placeholder="请输入"/>
            </label>
            <label>
              <span>制度名称：</span>
              <input nz-input [(ngModel)]="name" placeholder="请输入"/>
            </label>
            <label style="margin-right: 0">
              <button nz-button style="margin-right:10px" nzType="primary" (click)="search()">查询</button>
              <button nz-button nzType="default" (click)="resetSearch()">重置</button>
            </label>
          </div>
          <div class="tableTop fl-l">
            <nz-dropdown [nzTrigger]="'hover'">
              <button nz-dropdown nz-button nzType="default"><i nz-icon nzType="upload" nzTheme="outline"></i>导出</button>
              <ul nz-menu>
                <li nz-menu-item (click)="exportShow(1)">导出选中</li>
                <li nz-menu-item (click)="exportShow(3)">导出全部</li>
              </ul>
            </nz-dropdown>
          </div>
        </div>
        <div>
          <ng-template #totalTemplate let-total>总共 {{ pageInfo.totalRecords? pageInfo.totalRecords:0 }} 条</ng-template>
          <nz-table
            nzBordered
            [nzData]="dataList"
            [nzFrontPagination]="false"
            [nzShowPagination]="true"
            [nzPageIndex]="pageInfo.first"
            [nzTotal]="pageInfo.totalRecords"
            [nzShowTotal]="totalTemplate"
            [nzPageSize]="pageInfo.rows"
            [nzLoadingDelay]="1"
            [nzPageSizeOptions]="[10,20,30,50,100]"
            [nzShowQuickJumper]="true"
            [nzShowSizeChanger]="true"
            (nzPageIndexChange)="pageInfo.first = $event;getPage(pageInfo)"
            (nzPageSizeChange)="pageInfo.rows = $event;getPage(pageInfo)"
            (nzCurrentPageDataChange)="currentPageDataChange($event)"
            [nzWidthConfig]="widthConfigs"
            [nzScroll]="{x: '2370px'}"
          >
            <thead>
            <tr>
              <th class="tableCheck"
                  nzShowCheckbox
                  [(nzChecked)]="isAllCheck"
                  [nzIndeterminate]="isIndeterminate"
                  (nzCheckedChange)="checkAll($event)"
                  nzLeft="0px"
              ></th>
              <th>文件号</th>
              <th>制度名称</th>
              <th>制度类型</th>
              <th>执行部门</th>
              <th>作用对象</th>
              <th>制度状态</th>
              <th>制度生效日期</th>
              <th>查看有效日期</th>
              <th>其他部门操作权限</th>
              <th>发布人</th>
              <th>发布部门</th>
              <th>发布日期</th>
              <th nzRight="0px">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let item of dataList">
              <td
                nzShowCheckbox
                [(nzChecked)]="mapOfCheckedId[item.id]"
                (nzCheckedChange)="refreshStatus()"
                nzLeft="0px"
              ></td>
              <td>{{item.number}}</td>
              <td>{{item.name}}</td>
              <td>{{item.caseType}}</td>
              <td>{{item.deptNameStr}}</td>
              <td>{{item.actionTarget}}</td>
              <td>{{stateObj[item.state]}}</td>
              <td>{{item.effectiveDate | date: 'yyyy-MM-dd'}}</td>
              <td>
                <span *ngIf="item.noLimitViewDate">不限</span>
                <span *ngIf="!item.noLimitViewDate">
                  {{item.viewStartDate | date: 'yyyy-MM-dd'}}至{{item.viewEndDate | date: 'yyyy-MM-dd'}}
                </span>
              </td>
              <td>{{item.otherDeptAuth}}</td>
              <td>{{item.publisherName}}</td>
              <td>{{item.publishDeptName}}</td>
              <td>{{item.publishDate}}</td>
              <td nzRight="0px">
                <span class="operaFont m-r-sm" (click)="look(item)">预览</span>
                <span class="operaFont m-r-sm" (click)="downFj(item)">下载</span>
                <span class="operaTao" (click)="feedBackDetail(item)">反馈详情</span>
              </td>
            </tr>
            </tbody>
          </nz-table>
        </div>
      </div>
    </div>
  </div>
</div>

<!--反馈详情-->
<div class="OutDiv" *ngIf="pageIndex == 3" style="background-color: #ffffff">
  <div class="exciseTableDiv" style="height: auto !important;">
    <div class="overf_h">
      <div class="fl-l">
        <nz-radio-group [(ngModel)]="tabTypeDetail" [nzButtonStyle]="'solid'" (ngModelChange)="tabsChangeDetail($event)">
          <label nz-radio-button [nzValue]="'all'"><span>全部</span></label>
          <label nz-radio-button [nzValue]="0"><span>待反馈</span></label>
          <label nz-radio-button [nzValue]="5"><span>审核中</span></label>
          <label nz-radio-button [nzValue]="15"><span>未通过</span></label>
          <label nz-radio-button [nzValue]="10"><span>已反馈</span></label>
        </nz-radio-group>
      </div>
      <div class="back-info operaFont fl-r" (click)="pageIndex = 1">
        返回上一级<i class="fa fa-reply m-l-sm"></i>
      </div>
    </div>
    <div style="margin: 15px 0;overflow: hidden">
      <div class="searchDiv fl-r">
        <label>
          <span>反馈人：</span>
          <input nz-input [(ngModel)]="feedbackName" placeholder="请输入"/>
        </label>
        <label>
          <span>是否执行：</span>
          <nz-select nzPlaceHolder="请选择" [(ngModel)]="isFeedback" style="width: 180px">
            <nz-option [nzValue]="1" nzLabel="是"></nz-option>
            <nz-option [nzValue]="0" nzLabel="否"></nz-option>
          </nz-select>
        </label>
        <label style="margin-right: 0">
          <button nz-button style="margin-right:10px" nzType="primary" (click)="searchDetail()">查询</button>
          <button nz-button nzType="default" (click)="resetSearchDetail()">重置</button>
        </label>
      </div>
      <div class="tableTop fl-l">
        <nz-dropdown [nzTrigger]="'hover'">
          <button nz-dropdown nz-button nzType="default"><i nz-icon nzType="upload" nzTheme="outline"></i>导出</button>
          <ul nz-menu>
            <li nz-menu-item (click)="exportShowDetail(1)">导出选中</li>
            <li nz-menu-item (click)="exportShowDetail(3)">导出全部</li>
          </ul>
        </nz-dropdown>
      </div>
    </div>
    <div>
      <ng-template #totalTemplateDetail let-total>总共 {{ pageInfoDetail.totalRecords? pageInfoDetail.totalRecords:0 }} 条</ng-template>
      <nz-table
        nzBordered
        [nzData]="dataListDetail"
        [nzFrontPagination]="false"
        [nzShowPagination]="true"
        [nzPageIndex]="pageInfoDetail.first"
        [nzTotal]="pageInfoDetail.totalRecords"
        [nzShowTotal]="totalTemplateDetail"
        [nzPageSize]="pageInfoDetail.rows"
        [nzLoadingDelay]="1"
        [nzPageSizeOptions]="[10,20,30,50,100]"
        [nzShowQuickJumper]="true"
        [nzShowSizeChanger]="true"
        (nzPageIndexChange)="pageInfoDetail.first = $event;getPageDetail()"
        (nzPageSizeChange)="pageInfoDetail.rows = $event;getPageDetail()"
        (nzCurrentPageDataChange)="currentPageDataChangeDetail($event)"
      >
        <thead>
        <tr>
          <th class="tableCheck"
              nzShowCheckbox
              [(nzChecked)]="isAllCheckDetail"
              [nzIndeterminate]="isIndeterminateDetail"
              (nzCheckedChange)="checkAllDetail($event)"
          ></th>
          <th>反馈人</th>
          <th>反馈时间</th>
          <th>是否执行</th>
          <th>执行情况记录/备注原因</th>
          <th>反馈状态</th>
        </tr>
        </thead>
        <tbody>
        <tr *ngFor="let item of dataListDetail">
          <td
            nzShowCheckbox
            [(nzChecked)]="mapOfCheckedIdDetail[item.id]"
            (nzCheckedChange)="refreshStatusDetail()"
          ></td>
          <td>{{item.feedbackUserName}}</td>
          <td>{{item.feedbackDate | date: 'yyyy-MM-dd'}}</td>
          <td>{{item.isExecute == 1?'是':'否'}}</td>
          <td>{{item.content}}</td>
          <td>
            <span *ngIf="item.feedbackState == 0">待反馈</span>
            <span *ngIf="item.feedbackState == 5">审核中</span>
            <span *ngIf="item.feedbackState == 15">未通过</span>
            <span *ngIf="item.feedbackState == 10">已反馈</span>
          </td>
        </tr>
        </tbody>
      </nz-table>
    </div>
  </div>
</div>

<app-system-form *ngIf="pageIndex == 2" [currObj]="currObj" [opreatType]="3" (backemit)="backthis($event)"></app-system-form>

